<div class="page-header">
    <h1><a href="/">{{config.title}}
        <small>Subtext</small>
    </a></h1>
</div>
<!--nav start-->
<nav class="navbar navbar-default" id="navHeader">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{config.siteUrl}}"><i class="fa fa-home"></i></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="{{config.siteUrl}}">首页 <span class="sr-only">(current)</span></a></li>
                <li><a href="#!/admin/article/add">新增</a></li>
                <!--
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                        <li class="divider"></li>
                        <li><a href="#">One more separated link</a></li>
                    </ul>
                </li>-->
            </ul>


            <ul class="nav navbar-nav navbar-right">
                <li>
                    <form class="navbar-form navbar-left" role="search">
                        <div class="form-group ">
                            <input type="text" class="searchBox form-control" placeholder="Search">
                        </div>
                        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i>搜索</button>
                    </form>
                </li>
                {{#if session.user}}
                    {{#with session.user}}
                        <li><a href="/user/show/{{id}}"><i class="fa fa-user fa-fw"></i> {{username}}</a></li>
                        <li><a href="/user/setting/{{id}}"><i class="fa fa-cog fa-fw"></i> 设置</a></li>
                        <li><a href="/user/logout"><i class="fa fa-sign-out fa-fw"></i> 退出</a></li>
                    {{/with}}
                {{/if}}
                {{#unless session.user}}
                    <li>&nbsp;&nbsp;&nbsp;&nbsp;</li>
                    <li><a href="/page/login"><i class="fa fa-sign-in fa-fw"></i> 登陆</a></li>
                    <li><a href="/page/register"><i class="fa fa-envelope fa-fw"></i> 注册</a></li>
                {{/unless}}
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>
<!--nav end-->
